home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
AIncludes
/
AppleGuide.a
< prev
next >
Wrap
Text File
|
1996-05-01
|
10KB
|
441 lines
;
; File: AppleGuide.a
;
; Contains: Apple Guide Interfaces.
;
; Version: Technology: System 7.5
; Release: Universal Interfaces 3.0d3 on Copland DR1
;
; Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
;
; Bugs?: If you find a problem with this file, send the file and version
; information (from above) and the problem description to:
;
; Internet: apple.bugs@applelink.apple.com
; AppleLink: APPLE.BUGS
;
;
IF &TYPE('__APPLEGUIDE__') = 'UNDEFINED' THEN
__APPLEGUIDE__ SET 1
IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
include 'AppleEvents.a'
ENDIF
IF &TYPE('__FILES__') = 'UNDEFINED' THEN
include 'Files.a'
ENDIF
IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
include 'Types.a'
ENDIF
IF FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE THEN
; Types
; typedef UInt32 AGRefNum
; typedef UInt32 AGCoachRefNum
; typedef UInt32 AGContextRefNum
AGAppInfo RECORD 0
eventId ds.l 1 ; offset: $0 (0)
refCon ds.l 1 ; offset: $4 (4)
contextObj ds.l 1 ; offset: $8 (8) ; private system field
sizeof EQU * ; size: $C (12)
ENDR
; typedef struct AGAppInfo * AGAppInfoPtr
; typedef AGAppInfoPtr * AGAppInfoHdl
; Constants
kAGDefault EQU 0
kAGFrontDatabase EQU 1
kAGNoMixin EQU -1
kAGViewFullHowdy EQU 1 ; Full-size Howdy
kAGViewTopicAreas EQU 2 ; Full-size Topic Areas
kAGViewIndex EQU 3 ; Full-size Index Terms
kAGViewLookFor EQU 4 ; Full-size Look-For (Search)
kAGViewSingleHowdy EQU 5 ; Single-list-size Howdy
kAGViewSingleTopics EQU 6 ; Single-list-size Topics
kAGFileMain EQU 'poco'
kAGFileMixin EQU 'mixn'
; To test against AGGetAvailableDBTypes
kAGDBTypeBitAny EQU $00000001
kAGDBTypeBitHelp EQU $00000002
kAGDBTypeBitTutorial EQU $00000004
kAGDBTypeBitShortcuts EQU $00000008
kAGDBTypeBitAbout EQU $00000010
kAGDBTypeBitOther EQU $00000080
; typedef UInt16 AGStatus
; Returned by AGGetStatus
kAGIsNotRunning EQU 0
kAGIsSleeping EQU 1
kAGIsActive EQU 2
; typedef UInt16 AGWindowKind
; Returned by AGGetFrontWindowKind
kAGNoWindow EQU 0
kAGAccessWindow EQU 1
kAGPresentationWindow EQU 2
;
; Error Codes
; Not an enum, because other OSErrs are valid.
;
; typedef SInt16 AGErr
; Apple Guide error codes
; -------------------- Apple event reply codes
kAGErrUnknownEvent EQU -2900
kAGErrCantStartup EQU -2901
kAGErrNoAccWin EQU -2902
kAGErrNoPreWin EQU -2903
kAGErrNoSequence EQU -2904
kAGErrNotOopsSequence EQU -2905
kAGErrReserved06 EQU -2906
kAGErrNoPanel EQU -2907
kAGErrContentNotFound EQU -2908
kAGErrMissingString EQU -2909
kAGErrInfoNotAvail EQU -2910
kAGErrEventNotAvailable EQU -2911
kAGErrCannotMakeCoach EQU -2912
kAGErrSessionIDsNotMatch EQU -2913
kAGErrMissingDatabaseSpec EQU -2914 ; -------------------- Coach's Chalkboard reply codes
kAGErrItemNotFound EQU -2925
kAGErrBalloonResourceNotFound EQU -2926
kAGErrChalkResourceNotFound EQU -2927
kAGErrChdvResourceNotFound EQU -2928
kAGErrAlreadyShowing EQU -2929
kAGErrBalloonResourceSkip EQU -2930
kAGErrItemNotVisible EQU -2931
kAGErrReserved32 EQU -2932
kAGErrNotFrontProcess EQU -2933
kAGErrMacroResourceNotFound EQU -2934 ; -------------------- API reply codes
kAGErrAppleGuideNotAvailable EQU -2951
kAGErrCannotInitCoach EQU -2952
kAGErrCannotInitContext EQU -2953
kAGErrCannotOpenAliasFile EQU -2954
kAGErrNoAliasResource EQU -2955
kAGErrDatabaseNotAvailable EQU -2956
kAGErrDatabaseNotOpen EQU -2957
kAGErrMissingAppInfoHdl EQU -2958
kAGErrMissingContextObject EQU -2959
kAGErrInvalidRefNum EQU -2960
kAGErrDatabaseOpen EQU -2961
kAGErrInsufficientMemory EQU -2962
;
; Events
; Not an enum because we want to make assignments.
;
; typedef UInt32 AGEvent
; Handy events for AGGeneral.
; Panel actions (Require a presentation window).
kAGEventDoCoach EQU 'doco'
kAGEventDoHuh EQU 'dhuh'
kAGEventGoNext EQU 'gonp'
kAGEventGoPrev EQU 'gopp'
kAGEventHidePanel EQU 'pahi'
kAGEventReturnBack EQU 'gobk'
kAGEventShowPanel EQU 'pash'
kAGEventTogglePanel EQU 'patg'
;
; Functions
; AGClose
; Close the database associated with the AGRefNum.
;
;
; pascal AGErr AGClose(AGRefNum *refNum)
;
IF ¨ GENERATINGCFM THEN
Macro
_AGClose
moveq #17,D0
dc.w $AA6E
EndM
ELSE
IMPORT_CFM_FUNCTION AGClose
ENDIF
;
; AGGeneral
; Cause various events to happen.
;
;
; pascal AGErr AGGeneral(AGRefNum refNum, AGEvent theEvent)
;
IF ¨ GENERATINGCFM THEN
Macro
_AGGeneral
moveq #13,D0
dc.w $AA6E
EndM
ELSE
IMPORT_CFM_FUNCTION AGGeneral
ENDIF
;
; AGGetAvailableDBTypes
; Return the database types available for this application.
;
;
; pascal UInt32 AGGetAvailableDBTypes(void )
;
IF ¨ GENERATINGCFM THEN
Macro
_AGGetAvailableDBTypes
moveq #8,D0
dc.w $AA6E
EndM
ELSE
IMPORT_CFM_FUNCTION AGGetAvailableDBTypes
ENDIF
;
; AGGetFrontWindowKind
; Return the kind of the front window.
;
;
; pascal AGWindowKind AGGetFrontWindowKind(AGRefNum refNum)
;
IF ¨ GENERATINGCFM THEN
Macro
_AGGetFrontWindowKind
moveq #12,D0
dc.w $AA6E
EndM
ELSE
IMPORT_CFM_FUNCTION AGGetFrontWindowKind
ENDIF
;
; AGGetFSSpec
; Return the FSSpec for the AGRefNum.
;
;
; pascal AGErr AGGetFSSpec(AGRefNum refNum, FSSpec *fileSpec)
;
IF ¨ GENERATINGCFM THEN
Macro
_AGGetFSSpec
moveq #15,D0
dc.w $AA6E
EndM
ELSE
IMPORT_CFM_FUNCTION AGGetFSSpec
ENDIF
;
; AGGetStatus
; Return the status of Apple Guide.
;
;
; pascal AGStatus AGGetStatus(void )
;
IF ¨ GENERATINGCFM THEN
Macro
_AGGetStatus
moveq #9,D0
dc.w $AA6E
EndM
ELSE
IMPORT_CFM_FUNCTION AGGetStatus
ENDIF
;
; AGInstallCoachHandler
; Install a Coach object location query handler.
;
;
; pascal AGErr AGInstallCoachHandler(CoachReplyUPP coachReplyProc, long refCon, AGCoachRefNum *resultRefNum)
;
IF ¨ GENERATINGCFM THEN
Macro
_AGInstallCoachHandler
moveq #18,D0
dc.w $AA6E
EndM
ELSE
IMPORT_CFM_FUNCTION AGInstallCoachHandler
ENDIF
;
; AGInstallContextHandler
; Install a context check query handler.
;
;
; pascal AGErr AGInstallContextHandler(ContextReplyUPP contextReplyProc, AEEventID eventID, long refCon, AGContextRefNum *resultRefNum)
;
IF ¨ GENERATINGCFM THEN
Macro
_AGInstallContextHandler
moveq #19,D0
dc.w $AA6E
EndM
ELSE
IMPORT_CFM_FUNCTION AGInstallContextHandler
ENDIF
;
; AGIsDatabaseOpen
; Return true if the database associated with the AGRefNum is open.
;
;
; pascal Boolean AGIsDatabaseOpen(AGRefNum refNum)
;
IF ¨ GENERATINGCFM THEN
Macro
_AGIsDatabaseOpen
moveq #6,D0
dc.w $AA6E
EndM
ELSE
IMPORT_CFM_FUNCTION AGIsDatabaseOpen
ENDIF
;
; AGOpen
; Open a guide database.
;
;
; pascal AGErr AGOpen(FSSpec *fileSpec, UInt32 flags, Handle mixinControl, AGRefNum *resultRefNum)
;
IF ¨ GENERATINGCFM THEN
Macro
_AGOpen
moveq #1,D0
dc.w $AA6E
EndM
ELSE
IMPORT_CFM_FUNCTION AGOpen
ENDIF
;
; AGOpenWithSearch
; Open a guide database and preset a search string.
;
;
; pascal AGErr AGOpenWithSearch(FSSpec *fileSpec, UInt32 flags, Handle mixinControl, ConstStr255Param searchString, AGRefNum *resultRefNum)
;
IF ¨ GENERATINGCFM THEN
Macro
_AGOpenWithSearch
moveq #2,D0
dc.w $AA6E
EndM
ELSE
IMPORT_CFM_FUNCTION AGOpenWithSearch
ENDIF
;
; AGOpenWithSequence
; Open a guide database and display a presentation window sequence.
;
;
; pascal AGErr AGOpenWithSequence(FSSpec *fileSpec, UInt32 flags, Handle mixinControl, short sequenceID, AGRefNum *resultRefNum)
;
IF ¨ GENERATINGCFM THEN
Macro
_AGOpenWithSequence
moveq #4,D0
dc.w $AA6E
EndM
ELSE
IMPORT_CFM_FUNCTION AGOpenWithSequence
ENDIF
;
; AGOpenWithView
; Open a guide database and override the default view.
;
;
; pascal AGErr AGOpenWithView(FSSpec *fileSpec, UInt32 flags, Handle mixinControl, short viewNum, AGRefNum *resultRefNum)
;
IF ¨ GENERATINGCFM THEN
Macro
_AGOpenWithView
moveq #5,D0
dc.w $AA6E
EndM
ELSE
IMPORT_CFM_FUNCTION AGOpenWithView
ENDIF
;
; AGQuit
; Make Apple Guide quit.
;
;
; pascal AGErr AGQuit(void )
;
IF ¨ GENERATINGCFM THEN
Macro
_AGQuit
moveq #16,D0
dc.w $AA6E
EndM
ELSE
IMPORT_CFM_FUNCTION AGQuit
ENDIF
;
; AGRemoveCoachHandler
; Remove the Coach object location query handler.
;
;
; pascal AGErr AGRemoveCoachHandler(AGCoachRefNum *resultRefNum)
;
IF ¨ GENERATINGCFM THEN
Macro
_AGRemoveCoachHandler
moveq #20,D0
dc.w $AA6E
EndM
ELSE
IMPORT_CFM_FUNCTION AGRemoveCoachHandler
ENDIF
;
; AGRemoveContextHandler
; Remove the context check query handler.
;
;
; pascal AGErr AGRemoveContextHandler(AGContextRefNum *resultRefNum)
;
IF ¨ GENERATINGCFM THEN
Macro
_AGRemoveContextHandler
moveq #21,D0
dc.w $AA6E
EndM
ELSE
IMPORT_CFM_FUNCTION AGRemoveContextHandler
ENDIF
;
; AGStart
; Start up Apple Guide in the background.
;
;
; pascal AGErr AGStart(void )
;
IF ¨ GENERATINGCFM THEN
Macro
_AGStart
moveq #10,D0
dc.w $AA6E
EndM
ELSE
IMPORT_CFM_FUNCTION AGStart
ENDIF
ENDIF
ENDIF ; __APPLEGUIDE__